﻿using System;
using System.Collections.Generic;
using Jayden.Dll.Web.Enums;
using Jayden.Dll.Web.HtmlControls.Descriptions;
using Jayden.Dll.Web.HtmlControls.Generics;
using Jayden.Dll.Web.HtmlControls.Interfaces;

namespace Jayden.Dll.Web.HtmlControls
{
	public class Col : HtmlElement, WithSpan
	{
		public Col() : base(ColDescription.Instance) { }

		public uint? Span { get { return GetAttributeUint("span"); } set { SetAttribute("span", value); } }
	}
	public class ColDescription : HtmlElementDescription
	{
		public static readonly ColDescription Instance = new ColDescription();
		private ColDescription() : base("col", HtmlVersion.Html4, false, false) { }
		public override Type ControlType { get { return typeof(Col); } }
		public override string Description { get { return "one or more columns in the column group represented by its colgroup parent."; } }
		public override bool AllowInnerText { get { return false; } }
		public override IEnumerable<HtmlElementDescription> PermittedElements { get { yield break; } }
		public override IEnumerable<HtmlElementDescription> PermittedParents { get { yield return ColGroupDescription.Instance; } }
	}
}
